package com.matt.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.matt.foundation.model.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * 预约试托(AboutPallet)实体类
 *
 * @author makejava
 * @since 2025-02-20 11:01:20
 */
@Data
@Table(name = "about_pallet")
@Entity
@EqualsAndHashCode(callSuper = true)
public class AboutPallet extends Model {
    /**
     * 创建时间
     */
    @Column(columnDefinition = "datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间'")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date created;
    /**
     * 是否删除 0：否，1是
     */
    @Column(columnDefinition = "bit(1) DEFAULT b'0' COMMENT '是否删除 0：否，1是'")
    private String deleted;
    /**
     * 所属园区
     */
    @Column(columnDefinition = "bit(1) DEFAULT b'0' COMMENT '是否删除 0：否，1是'")
    private String areaId;
    /**
     * 孩子生日
     */
    @Column(columnDefinition = "datetime DEFAULT NULL COMMENT '孩子生日'")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
    private Date birthday;
    /**
     * 线索方式 1：主动， 2：被动
     */
    @Column(columnDefinition = "int(11) DEFAULT '1' COMMENT '线索方式 1：主动， 2：被动'")
    private Integer category;
    /**
     * 是否转为线索   已转  ：未转
     */
    @Column(columnDefinition = " varchar(50) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '是否转为线索   已转  ：未转'")
    private String changeStatusVal;
    /**
     * 孩子姓名
     */
    @Column(columnDefinition = "varchar(50) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '孩子姓名'")
    private String childName;
    /**
     * 性别 1:男   0：女
     */
    @Column(columnDefinition = "int(11) DEFAULT '0' COMMENT '性别 1:男   0：女'")
    private Integer gender;
    /**
     * 家庭住址
     */
    @Column(columnDefinition = "varchar(100) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '家庭住址'")
    private String homeAddress;
    /**
     * 联系电话
     */
    @Column(columnDefinition = "varchar(20) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '联系电话'")
    private String mobile;
    /**
     * 姓名
     */
    @Column(columnDefinition = "varchar(50) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '姓名'")
    private String name;
    /**
     * 孩子昵称
     */
    @Column(columnDefinition = "varchar(50) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '孩子昵称'")
    private String nickName;
    /**
     * 户籍所在地
     */
    @Column(columnDefinition = "varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '户籍所在地'")
    private String registerResidence;
    /**
     * 户籍类型    1：本片  2：本区外片 3：本市外区  4：外籍  5：港澳台
     */
    @Column(columnDefinition = "varchar(50) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '户籍类型    1：本片  2：本区外片 3：本市外区  4：外籍  5：港澳台'")
    private String registerType;
    /**
     * 关系
     */
    @Column(columnDefinition = "varchar(50) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '关系'")
    private String relationship;
    /**
     *  状态
     */
    @Column(columnDefinition = "int(11) DEFAULT '1' COMMENT ' 状态 2=未试托 '")
    private Integer status;
    /**
     * 修改人id
     */
    @Column(columnDefinition = "varchar(32) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '修改人id'")
    private String updateUser;
    /**
     * 修改时间
     */
    @Column(columnDefinition = "datetime DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间'")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    private Date updateTime;

    @Column(columnDefinition = "varchar(32) COMMENT '线索所属'")
    private String staffId;

    @Column(columnDefinition = "varchar(50) COMMENT '员工姓名'")
    private String staffName;


    /**
     * 备注
     */
    @Column(columnDefinition = "varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '备注'")
    private String remark;

    @Column(columnDefinition = "varchar(32) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '月龄'")
    private String week;

    @Column(columnDefinition = "datetime COMMENT '下次跟进时间' ")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date nextTime;

    @Column(columnDefinition = "varchar(255) COMMENT '详细地址'")
    private String address;

    @Column(columnDefinition = "datetime COMMENT '预约到访时间' ")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+08:00")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date visitTime;

    @Column(columnDefinition = "COLLATE utf8mb4_bin DEFAULT NULL COMMENT '月龄'")
    private String monthsDiff;

    @Column(columnDefinition = "int(1) DEFAULT '1' COMMENT '1 = 小程序 2=pc'")
    private Integer type;

    @Column(columnDefinition = "varchar(32) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '小程序创建人id'")
    private String userId;

    @Column(columnDefinition = "int default 0 COMMENT '级别 0 =A重点客户 1=普通客户 2=非优先客户'")
    private Integer rankp;


    @Column(columnDefinition = "varchar(32) COMMENT '省份'")
    private String province;

    @Column(columnDefinition = "varchar(32) COMMENT '市'")
    private String city;

    @Column(columnDefinition = "varchar(32) COMMENT '区'")
    private String area;
}

